<h2>Panel Administrasi Domba Garut Online</h2>

Silakan pilih menu di samping.

<br/>
<br/>
<?php foreach ($daftar_admin as $admin) : ?>
<table width="70%">
    <tr class="trjudul">
        <td colspan="2" align="left"><strong>Info Admin</strong></td>
    </tr>
    <tr class="trcerah" onMouseOver="this.className='trsorot'" onMouseOut="this.className='trcerah'">
        <td width="30%">ID</td>
        <td><?php echo $admin['username']; ?></td>
    </tr>
    <tr class="trgelap" onMouseOver="this.className='trsorot'" onMouseOut="this.className='trgelap'">
        <td width="30%">Nama</td>
        <td><?php echo $admin['nama_admin']; ?></td>
    </tr>
    <tr class="trcerah" onMouseOver="this.className='trsorot'" onMouseOut="this.className='trcerah'">
        <td width="30%">Email</td>
        <td><?php echo $admin['email']; ?></td>
    </tr>
    <tr class="trgelap" onMouseOver="this.className='trsorot'" onMouseOut="this.className='trgelap'">
        <td width="30%">No. Telepon</td>
        <td><?php echo $admin['telp']; ?></td>
    </tr>
    <tr class="trcerah" onMouseOver="this.className='trsorot'" onMouseOut="this.className='trcerah'">
        <td width="30%">Alamat</td>
        <td><?php echo $admin['alamat']; ?></td>
    </tr>
    <tr class="trgelap" onMouseOver="this.className='trsorot'" onMouseOut="this.className='trgelap'">
        <td width="30%">Usia</td>
        <td><?php echo $admin['usia']; ?></td>
    </tr>
    <tr class="trcerah" onMouseOver="this.className='trsorot'" onMouseOut="this.className='trcerah'">
        <td width="30%">Tempat Tanggal Lahir</td>
        <td><?php echo $admin['tempat_lahir']; ?>, <?php echo $admin['tgl_lahir']; ?></td>
    </tr>
    
</table>
<?php endforeach; ?>
<br/>

<table width="70%">
    <tr class="trjudul">
        <td colspan="2" align="left"><strong>Jumlah data</strong></td>
    </tr>
    <tr class="trcerah" onMouseOver="this.className='trsorot'" onMouseOut="this.className='trcerah'">
        <td width="30%">Jumlah produk</td>
        <td><?php echo $this->db->count_all('tb_produk'); ?> produk</td>
    </tr>
    <tr class="trgelap" onMouseOver="this.className='trsorot'" onMouseOut="this.className='trgelap'">
        <td width="30%">Jumlah artikel</td>
        <td><?php echo $this->db->count_all('tb_artikel'); ?> artikel</td>
    </tr>
    <tr class="trcerah" onMouseOver="this.className='trsorot'" onMouseOut="this.className='trcerah'">
        <td width="30%">Jumlah user</td>
        <td><?php echo $this->db->count_all('tb_user'); ?> user</td>
    </tr>
    <tr class="trgelap" onMouseOver="this.className='trsorot'" onMouseOut="this.className='trgelap'">
        <td width="30%">Jumlah kritik & saran</td>
        <td><?php echo $this->db->count_all('tb_kritiksaran'); ?> pesan</td>
    </tr>
    <tr class="trcerah" onMouseOver="this.className='trsorot'" onMouseOut="this.className='trcerah'">
        <td width="30%">Jumlah pesanan</td>
        <td><?php echo $this->db->count_all('tb_pesanan'); ?> pesanan</td>
    </tr>
</table>

<br/>


<table width="70%">
    <tr class="trjudul">
        <td colspan="2" align="left"><strong>Statistik Pemesanan Tahun 2010</strong></td>
    </tr>
    <?php

    $daftar_pemesanan = $this->M_statistik->get_pemesanan_per_bulan('2010');
    $bulan = array('', 'Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 'Agustus', 'September', 'Oktober', 'November', 'Desember');

    ?>
    
    <?php $i = 1; foreach ($daftar_pemesanan as $stat): ?>

    <tr onMouseOver="this.className='trsorot'" onMouseOut="this.className='trcerah'" <?php if($i % 2) echo "style='background-color: #E0E0E0;'"; ?>>
        <td width='30%'>Bulan <?php echo $bulan[$stat['bulan']]; ?> :</td>
        <td><strong> <?php echo $stat['jumlah'] ?> Pemesanan</strong></td>
    </tr>

   <?php $i++; endforeach; ?>



</table>

<table width="70%">
    <tr class="trjudul">
        <td colspan="2" align="left"><strong>Statistik Pemesanan Tahun 2011</strong></td>
    </tr>
    <?php

    $daftar_pemesanan = $this->M_statistik->get_pemesanan_per_bulan('2011');
    $bulan = array('', 'Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 'Agustus', 'September', 'Oktober', 'November', 'Desember');

    ?>

    <?php $i = 1; foreach ($daftar_pemesanan as $stat): ?>

    <tr onMouseOver="this.className='trsorot'" onMouseOut="this.className='trcerah'" <?php if($i % 2) echo "style='background-color: #E0E0E0;'"; ?>>
        <td width='30%'>Bulan <?php echo $bulan[$stat['bulan']]; ?> :</td>
        <td><strong> <?php echo $stat['jumlah'] ?> Pemesanan</strong></td>
    </tr>

   <?php $i++; endforeach; ?>



</table>

<br/>